package com.zlzlib.okhttp.utils;

import com.zlzlib.okhttp.xml.BaseXmlContent;
import okhttp3.MediaType;

/**
 * @DateTime: 2024/7/18 10:12
 * @Author zlz
 * @Version 1.0
 */
public class OkHttpUtil {

    public static MediaType mediaJson() {
        return MediaType.parse("application/json; charset=utf-8");
    }


    public static MediaType mediaXml() {
        return MediaType.parse("text/xml; charset=utf-8");
    }

    public static String getSoapReqXml(BaseXmlContent req) {
        return getSoapReqXml(req.toString());
    }

    public static String getSoapReqXml(String req) {
        return "<![CDATA[" + req + "]]>";
    }
}
